//app.js
App({
    onLaunch: function (ops) {
        // 展示本地存储能力
        var logs = wx.getStorageSync('logs') || []
        logs.unshift(Date.now())
        wx.setStorageSync('logs', logs)

        // 登录
        // 获取用户信息
        wx.login({
            success: res => {
                wx.request({
                    url: 'https://www.lingfeng.me/gserver/web/user/login',
                    data: {
                        code: res.code
                    },
                    success: function (res) {
                        console.log(res.statusCode);
                    }
                })
            }
        })

        if (ops.scene == 1044) {
            wx.getShareInfo({
                shareTicket: ops.shareTicket,
                success: function (res) {
                    //console.log("wx.getShareInfo:::", res)
                }
            })
        }
    },
    globalData: {
        userInfo: null
    }
})